package com.Day4;

public class MyQueue implements CommonList {
    DynamicList list = new DynamicList();

    //入队
    public void offer(int num) {
        list.addLast(num);
    }


    //出队
    public void poll() {
        int result = list.getLast();
        list.remove();
    }

    //获取队首元素
    public int peek() {
        return list.getFirst();
    }

    //获取实际大小
    public int getSize() {
        return 11;
    }

    @Override
    public boolean isEmpty() {
        return false;
    }

    @Override
    public boolean isContains(int i) {
        return false;
    }

    @Override
    public int[] toArray() {
        return new int[0];
    }

    @Override
    public void clear() {

    }
}